#!/usr/bin/env bash

declare -r DOCKER_HUB="docker-hub:5000"
declare -r REGISTRYWEB_HOME="/appdata/registryweb"

mkdir -p ${REGISTRYWEB_HOME}/data

docker run \
  --name registry-web \
  --detach \
  --restart always \
  -p 8080:8080 \
  -v ${REGISTRYWEB_HOME}/config.yml:/conf/config.yml \
  -v ${REGISTRYWEB_HOME}/registry.key:/conf/registry.key \
  -v ${REGISTRYWEB_HOME}/data:/data \
  ${DOCKER_HUB}/hyper/docker-registry-web:v0.1.2

# /bin/registry garbage-collect /etc/docker/registry/config.yml
